/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.system.action.system;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.system.mapper.system.ClassifyConfigureMapper;
public class ClassifyConfigure extends BaseAction
{
    @Autowired(required=false)
	private ClassifyConfigureMapper mapper;
    /**
    分类管理
    */
    
    public Map classifyConfigure() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_product_class=mapper.s_product_class(params);
        result.put("s_product_class", s_product_class);
        
        
        SQLList<SQLMap> s_pro_produce_class=mapper.s_pro_produce_class(params);
        result.put("s_pro_produce_class", s_pro_produce_class);
        
        return result;
    }
    /**
    产品分类
    */
    
    public Map productType() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMID",-1);
        SQLList<SQLMap> pro_classid=mapper.pro_classid(params);
        pro_classid.setSelectNone("classid备注");
        result.put("pro_classid", pro_classid);
        
        
        SQLList<SQLMap> pro_cate=mapper.pro_cate(params);
        SQLMap pro_cate_emt=pro_cate.getExistfirst();
        result.put("pro_cate", pro_cate_emt);
        
        return result;
    }
    /**
    修改
    */
    
    public Map productTypeUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> ss_product_class=mapper.ss_product_class(params);
        SQLMap ss_product_class_emt=ss_product_class.getExistfirst();
        result.put("ss_product_class", ss_product_class_emt);
        
        
        
        return result;
    }
    /**
    增加子分类
    */
    
    public Map productTypeLowerAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        return result;
    }
    /**
    工序分类
    */
    
    public Map processType() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("category_id",-1);
        SQLList<SQLMap> classid=mapper.classid(params);
        classid.setSelectNone("classid备注");
        result.put("classid", classid);
        
        
        params.def("category_id",-1);
        SQLList<SQLMap> cate=mapper.cate(params);
        SQLMap cate_emt=cate.getExistfirst();
        result.put("cate", cate_emt);
        
        return result;
    }
    /**
    修改
    */
    
    public Map processTypeUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> ss_produce_class=mapper.ss_produce_class(params);
        SQLMap ss_produce_class_emt=ss_produce_class.getExistfirst();
        result.put("ss_produce_class", ss_produce_class_emt);
        
        
        
        return result;
    }
    /**
    增加分类
    */
    
    public Map processTypeAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        return result;
    }
    /**
    */
    
    public Map d_product_class() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_product_class(params);
        
        return result;
    }
    /**
    修改修改
    */
    
    public Map productTypeUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_product_class = mapper.u_product_class(params);
        result.put("u_product_class", u_product_class);
        
        return result;
    }
    /**
    增加子分类修改
    */
    
    public Map productTypeLowerAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int newid = mapper.newid(params);
        result.put("newid", newid);
        
        return result;
    }
    /**
    */
    
    public Map d_class() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_class(params);
        
        return result;
    }
    /**
    修改修改
    */
    
    public Map processTypeUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_pro_produce_class = mapper.u_pro_produce_class(params);
        result.put("u_pro_produce_class", u_pro_produce_class);
        
        return result;
    }
    /**
    增加分类修改
    */
    
    public Map processTypeAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int newid = mapper.newid(params);
        result.put("newid", newid);
        
        return result;
    }
}